﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Entity;
using DAL;

public partial class admin_FriendLinksAdd : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Links user = new Links();
        user.Title = txtTitle.Text.Trim();
        user.ENTitle = txtENTitle.Text.Trim();
        user.Url = txtUrl.Text.Trim();
        user.Sort = txtSort.Text.Trim()==""?99:int.Parse(txtSort.Text.Trim());
        if (LinksDAL.Instance.InsertLinks(user) > 0)
        {
            Alert("新增成功!");
            ExecuteScript("btnAdd();");
        }
        else
        {
            Alert("新增失败!");
        }


    }
}